class Global {
    constructor() {
        // 存入Character
        this.party = [];
        // 存入Item
        this.bag = new Bag();
        // 设置主要操作Character
        this.player = null;
        // 设置升级表单
        
    }
}

// 初始化公共参数
this.global = new Global();

// 初始化道具数据缓存中心
this.global.itemLoaded = {};
this.global.loadItem = async function(url) {
	async function loadUrl(url, callback) {
		L2D.Loader.load(url, null, function(e) {
			callback(e.content);
		});
	}

	if(!global.itemLoaded[url]) {
		global.itemLoaded[url] = await new Promise(resolve => loadUrl(url, resolve));
	}

	return global.itemLoaded[url];
}